<!DOCTYPE html>
<html>
<head>
<meta charset="{CHARSET}">
<title></title>
<link href="bootstrap.min.def.css" rel="stylesheet">
<link href="bootstrap-table.min.css" rel="stylesheet">

 <script src="jquery-3.3.1.min.js"></script>
 <script src="bootstrap.min.js"></script>
 <script src="jquery.validate.min.js"></script>
 <script src="bootstrap-table.min.js"></script>
 <script src="messages_zh.js"></script>
	</head>

	<body>
    <table id="table"></table>
	<script>
	
	function igno()
	{
$(function(){
$('#table').bootstrapTable({
ajax : function (request) {
$.ajax({
type : "GET",
url :  "http://120.27.32.237:83/common.ashx?method=getlist",
dataType:"json",
 success : function (data) {			
   request.success({
			row : data.rows
				}); 
            $('#table').bootstrapTable('load', data.rows);
            },
			error:function(){
				alert("error");
			}
        });
	},
		pagination: true,
		pageSize: 10,
		pageNumber: 1,
		pageList: "[10,20,30,50]",
		sortName: "Name",
		showColumns: true,
		search: true,
		sortOrder: "desc",
		columns: [{
			field: "state",
			checkbox:true,
		},{
			field: 'Name',
			title: '姓名',
			align: 'center', 
            valign: 'middle' 
		}, {
			field: 'Age',
			title: '年龄',
			align: 'center', 
            valign: 'middle' 
		}, {
			field: 'Time',
			title: '时间',
			align: 'center', 
            valign: 'middle' 
		}
		],

	});
})

}
/*
function initdata()
{


$("#table").bootstrapTable({ // 对应table标签的id
      //row:[{"Name":"Jason Li","Age":"25","Time":"2018/8/2 8:53:30"},{"Name":"","Age":"","Time":""},{"Name":"张三","Age":"23","Time":"2018/8/2 8:53:30"},{"Name":"李四","Age":"25","Time":"2018/8/2 8:53:30"}],
      striped: true,  //表格显示条纹，默认为false
      pagination: true, // 在表格底部显示分页组件，默认false
      pageList: [10, 20], // 设置页面可以显示的数据条数
      pageSize: 10, // 页面数据条数
      pageNumber: 1, // 首页页码
      //sidePagination: 'server', // 设置为服务器端分页
      sortName: 'Name', // 要排序的字段
      sortOrder: 'desc', // 排序规则
      columns: [{
			field: "state",
			checkbox:true,
		},{
			field: 'Name',
			title: '姓名',
			align: 'center', 
            valign: 'middle' 
		}, {
			field: 'Age',
			title: '年龄',
			align: 'center', 
            valign: 'middle' 
		}, {
			field: 'Time',
			title: '时间',
			align: 'center', 
            valign: 'middle' 
		}
		],
      onLoadSuccess: function(){  //加载成功时执行
            console.info("加载成功");
      },
      onLoadError: function(){  //加载失败时执行
            console.info("加载数据失败");
      }

})

$('#table').bootstrapTable('load',[{"Name":"Jason Li","Age":"25","Time":"2018/8/2 8:53:30"},{"Name":"","Age":"","Time":""},{"Name":"张三","Age":"23","Time":"2018/8/2 8:53:30"},{"Name":"李四","Age":"25","Time":"2018/8/2 8:53:30"}]); 

$.ajax({
url: "http://120.27.32.237:83/common.ashx?method=getlist",
 dataType:'json',
 type:'POST',
 success: function(data){
       //$('#table').bootstrapTable('load', data.rows); 
      },
	  error: function(error){
		alert("ERROR!");
		}
    });
}
initdata();
*/
</script>
</body>
</html>


